<template>
  <div class="myaudit">
    <a-card :bordered="false" style="border-radius:8px">
      <div class="flex row_bet flex_wrap">
        <div class="card_title">
          {{ rows.title }}
          <!-- <span style="color:#B5B8BD">| {{ rows.eventId }} {{ rows.saveTime }} 至 {{ rows.endTime }}</span> -->
        </div>
        <a-range-picker
          :ranges="{
            本周: [moment().subtract(parseInt(moment().format('d')) - 1, 'days'), moment()],
            上周: [
              moment().subtract(parseInt(moment().format('d')) + 6, 'days'),
              moment().subtract(parseInt(moment().format('d')), 'days')
            ],
            本月: [
              moment()
                .month(moment().month())
                .startOf('month'),
              moment()
                .month(moment().month())
                .endOf('month')
            ],
            上月: [
              moment(
                moment()
                  .subtract(1, 'month')
                  .format('YYYY-MM') + '-01'
              ),
              moment(
                moment()
                  .subtract(1, 'month')
                  .format('YYYY-MM') + '-01'
              )
                .subtract(-1, 'month')
                .add(-1, 'days')
            ],
            半年: [
              moment()
                .startOf('day')
                .subtract(6, 'month'),
              moment()
            ]
          }"
          format="YYYY/MM/DD"
          @change="severChange"
          style="width:250px;margin-bottom: 5px;"
        >
          <div>
            <a-icon type="calendar"/>
            <span class="ml5 mr5">{{ severstr }}</span>
            <a-icon type="down" style="font-size:12px"/>
          </div>
        </a-range-picker>
      </div>
      <div class="header_box">
        <div class="header-info">
          <div class="title">推广商品数</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="0"
              :endVal="service.itemNum == null ? 0 : parseFloat(service.itemNum)"
              :duration="3000"
            >
            </countTo>
          </div>
        </div>

        <div class="header-info">
          <div class="title">引流UV</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="0"
              :endVal="service.clickUv == null ? 0 : parseFloat(service.clickUv)"
              :duration="3000"
            >
            </countTo>
          </div>
        </div>

        <div class="header-info">
          <div class="title">付款金额</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="2"
              :endVal="service.alipayAmt == null ? 0 : parseFloat(service.alipayAmt)"
              :duration="3000"
            >
            </countTo>
          </div>
        </div>

        <div class="header-info">
          <div class="title">付款笔数</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="0"
              :endVal="service.alipayNum == null ? 0 : parseFloat(service.alipayNum)"
              :duration="3000"
            >
            </countTo>
          </div>
        </div>

        <div class="header-info">
          <div class="title">预估付款服务费</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="2"
              :endVal="service.preServiceFee== null ? 0 : parseFloat(service.preServiceFee)"
              :duration="3000"></countTo>
          </div>
        </div>

        <div class="header-info">
          <div class="title">结算金额</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="2"
              :endVal="service.settleAmt == null ? 0 : parseFloat(service.settleAmt)"
              :duration="3000"
            >
            </countTo>
          </div>
        </div>

        <div class="header-info">
          <div class="title">结算笔数</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="0"
              :endVal="service.settleNum == null ? 0 : parseFloat(service.settleNum)"
              :duration="3000"
            >
            </countTo>
          </div>
        </div>

        <div class="header-info">
          <div class="title">预估结算服务费</div>
          <div class="datainfo">
            <countTo
              :startVal="startVal"
              :decimals="2"
              :endVal="service.cmServiceFee == null ? 0 : parseFloat(service.cmServiceFee)"
              :duration="3000"
            >
            </countTo>
          </div>
        </div>
      </div>
    </a-card>
    <div class="lt_card">
      <a-card :bordered="false" style="border-radius:8px;margin-top:10px">
        <div class="groupbox flex row_bet">
          <a-radio-group v-model="activityradio" @change="groupChange">
            <a-radio :value="1">
              报名商品
            </a-radio>
            <a-radio :value="2">
              推广效果
            </a-radio>
          </a-radio-group>
        </div>
        <a-divider/>
        <div style="text-align:right;margin-bottom:10px">
          <div class="choose flex row_bet flex_wrap" v-if="activityradio === 1">
            <!--            <div class="btns">-->
            <a-radio-group class="br4" style="text-align: left;" :value="auditStatus" @change="userChange">
              <a-radio-button value="a">
                所有商品
              </a-radio-button>
              <a-radio-button :value="1">
                待审核
              </a-radio-button>
              <a-radio-button :value="2">
                已审核
              </a-radio-button>
              <a-radio-button :value="3">
                已拒绝
              </a-radio-button>
            </a-radio-group>
            <!--            </div>-->

            <a-input-search
              placeholder="标题关键词/商品ID/店铺名"
              style="width: 230px"
              allowClear
              v-model="search"
              @search="onSearch"
            />
          </div>
          <div class="choose" v-else>
            <div class="flex row_right">
              <a-input-search
                placeholder="标题关键词/商品ID/店铺名"
                style="width: 230px"
                allowClear
                v-model="passsearch"
                @search="dopasssearch"
              />
              <a-button type="primary" class="m_r_10 m_l_10 br4" :loading="searchloading" @click="dopasssearch">
                搜索
              </a-button>
              <a-button class="br4">导出</a-button>
            </div>
          </div>
        </div>
        <a-table
          v-if="activityradio === 1"
          :columns="columns"
          :rowKey="goodsList => goodsList.itemId"
          :dataSource="goodsList"
          :loading="loading"
          @change="handleTableChange"
          :pagination="pagination"
          :scroll="{ x: 1000, y: 700 }"
        >
          <div slot="pictUrl" slot-scope="text,row">
            <div class="goodsinfo">
              <img :src="row.pictUrl" style="width:77px;height:77px;margin-right:15px;border-radius: 8px;"/>
              <div class="info-right">
                <div class="line-1 font13" style="width: 291px">
                  <a :href="row.auctionUrl" target="_blank" rel="noopener noreferrer"> {{ row.title }}</a>
                </div>
                <div class="flex row_bet font13" style="margin:8px 0;">
                  <span>￥{{ row.zkFinalPrice }}</span>
                  <div>
                    <span class="p_r_10 font13"> 券后价: ￥{{ row.couponZkFinalPrice }}</span>
                    <span class="font13"> 销量: {{ row.biz30day }}</span>
                  </div>
                </div>
                <div class="font13">店铺:{{ row.shopTitle }}</div>
              </div>
            </div>
          </div>
          <div slot="auditStatus" slot-scope="text,row">
            <div
              :style="{ color: row.auditStatus == 1 ? '#101010' :row.auditStatus == 2 ? '#39C15B':'#FF2525',fontSize:'13px' }">
              {{ row.auditStatus == 1 ? '待审核' : row.auditStatus == 2 ? '已审核':'已拒绝' }}
            </div>
          </div>
          <div slot="startTime" slot-scope="text,row">
            <div class="font13">起: {{ row.startTime }}</div>
            <div class="font13">止: {{ row.endTime }}</div>
          </div>
          <div slot="commissionRate" slot-scope="text,row">
            <div class="font13" style="color:#2396F9;">{{ row.commissionRate }}%</div>
          </div>
          <div slot="serviceRate" slot-scope="text,row">
            <div class="font13" style="color:#2396F9;">{{ row.serviceRate }}%</div>
          </div>
          <div slot="couponInfo" slot-scope="text,row">
            <div class="font13">{{ row.couponInfo === null?'无':row.couponInfo }}</div>
          </div>
          <div slot="active" slot-scope="text,row">
            <div v-if="row.auditStatus === 1">
              <div>
                <a-button type="link" @click="dopass(row)" style="color:#2396F9;">通过</a-button>
              </div>
              <div>
                <a-button type="link" @click="dorefuse(row)" style="color:#292929;">拒绝</a-button>
              </div>
              <a-button type="link" @click="getcommission(row.itemId)" style="color:#292929;">佣金</a-button>
            </div>
            <div v-if="row.auditStatus === 2">
              <a-button type="link" @click="docopy(row)" style="color:#39C15B;">推广</a-button>
            </div>
            <div v-if="row.auditStatus === 3">
              无
            </div>
            <!-- <a-popconfirm title="确定删除吗?" ok-text="删除" cancel-text="取消" @confirm="delArticle(item.id)">
              <span class="goodsurl quan">删</span>
            </a-popconfirm> -->
          </div>
        </a-table>
        <a-table
          v-else
          :columns="columns2"
          :rowKey="activity2 => (activity2.itemId + activity2.alipayAmt)"
          :dataSource="activity2"
          :loading="loading2"
          @change="handleTableChange2"
          :pagination="pagination2"
          :scroll="{ x: 1000, y:700 }"
        >
          <div slot="pictUrl" slot-scope="text, row">
            <div class="goodsinfo">
              <img
                :src="row.pictUrl"
                alt=""
                srcset=""
                style="width:77px;height:77px;margin-right:8px;border-radius: 8px;"
              />
              <div class="info-right font13">
                <div class="line-1" style="width: 220px">
                  <a :href="row.auctionUrl" target="_blank" rel="noopener noreferrer"> {{ row.title }}</a>
                </div>
                <div class="flex row_bet" style="margin:8px 0;">
                  <span>￥{{ row.zkFinalPrice }}</span>
                  <div>
                    <span class="p_r_10">券后价：￥{{ row.couponZkFinalPrice }}</span>
                    <span>排期：{{ row.xiangcha }}天</span>
                  </div>
                </div>
                <div>店铺：{{ row.shopTitle }}</div>
              </div>
            </div>
          </div>
          <div slot="startTime" slot-scope="text, row">
            <div class="font13">起:{{ row.startTime }}</div>
            <div class="font13">止:{{ row.endTime }}</div>
          </div>
          <div slot="commissionRate" slot-scope="text, row">
            <div class="font13">{{ row.commissionRate }}%</div>
          </div>

        </a-table>
        <!-- <div class="nogoods" v-else>
          <img :src="require('@/assets/imgs/nogoods.png')" alt="" srcset="" />
          <div>搜索商品进行审核</div>
        </div> -->
      </a-card>
    </div>
    <a-modal
      v-model="iframeshow"
      title="请通过验证再检测"
      width="400px"
      ok-text="我已通过"
      cancel-text="取消"
      @ok="hideModal">
      <iframe :src="taobaopurl" frameborder="0" style="width: 100%;height: 400px;"></iframe>
    </a-modal>
  </div>
</template>

<script>
  import moment from 'moment'
  import countTo from 'vue-count-to'
  import {
    doexaminegoods,
    getcommission,
    getexaminegoods,
    getextensioneffectdata,
    getlinkurl,
    getmyactivedata
  } from '@/api/activityApi'

  export default {
    name: 'Myaudit',
    components: {
      countTo
    },
    data () {
      return {
        moment,
        item: null,
        iframeshow: false,
        taobaopurl: '',
        startVal: 0,
        endVal: 2017,
        service: {
          alipayAmt: 0, // 付款金额
          alipayNum: 0, // 付款笔数
          avgSettleAmtPerItem: 0,
          clickTaokeNum: 0,
          clickUv: 0, // 引流UV
          cmServiceFee: 0, // 结算服务费
          couponUseNum: 0,
          itemNum: 0, // 推广商品数
          preServiceFee: 0, // 预估服务费
          pubClickUv: 0,
          settleAmt: 0, // 结算金额
          settleNum: 0 // 结算笔数
        },
        columns: [
          {
            title: '商品信息',
            align: 'center',
            width: 400,
            // dataIndex: 'pictUrl',
            scopedSlots: {
              customRender: 'pictUrl'
            }
          },
          {
            title: '商品状态',
            align: 'center',
            // dataIndex: 'auditStatus',
            scopedSlots: {
              customRender: 'auditStatus'
            }
          },
          {
            title: '排期时间',
            align: 'center',
            // dataIndex: 'startTime',
            scopedSlots: {
              customRender: 'startTime'
            }
          },
          {
            title: '佣金比例',
            align: 'center',
            // dataIndex: 'commissionRate',
            scopedSlots: {
              customRender: 'commissionRate'
            }
          },
          {
            title: '服务费率',
            align: 'center',
            // dataIndex: 'serviceRate',
            scopedSlots: {
              customRender: 'serviceRate'
            }
          },
          {
            title: '优惠券',
            align: 'center',
            // dataIndex: 'couponInfo',
            scopedSlots: {
              customRender: 'couponInfo'
            }
          },
          {
            title: '操作',
            align: 'center',
            scopedSlots: {
              customRender: 'active'
            }
          }
        ],
        columns2: [
          {
            title: '商品信息',
            align: 'center',
            width: 340,
            dataIndex: 'pictUrl',
            scopedSlots: {
              customRender: 'pictUrl'
            }
          },
          {
            title: '排期时间',
            align: 'center',
            width: 132,
            dataIndex: 'startTime',
            scopedSlots: {
              customRender: 'startTime'
            }
          },

          {
            title: '引流UV',
            align: 'center',
            dataIndex: 'clickUv',
            scopedSlots: {
              customRender: 'clickUv'
            }
          },
          {
            title: '卷用量',
            align: 'center',
            dataIndex: 'couponUseNum',
            scopedSlots: {
              customRender: 'couponUseNum'
            }
          },
          {
            title: '淘宝客数',
            align: 'center',
            dataIndex: 'taokeNum',
            scopedSlots: {
              customRender: 'taokeNum'
            }
          },
          {
            title: '报名佣金',
            align: 'center',
            dataIndex: 'commissionRate',
            scopedSlots: {
              customRender: 'commissionRate'
            }
          },
          {
            title: '服务费率',
            align: 'center',
            dataIndex: 'avgServiceRate',
            scopedSlots: {
              customRender: 'avgServiceRate'
            }
          },
          {
            title: '付款笔数',
            align: 'center',
            dataIndex: 'alipayNum',
            scopedSlots: {
              customRender: 'alipayNum'
            }
          },
          {
            title: '付款金额',
            align: 'center',
            dataIndex: 'alipayAmt',
            scopedSlots: {
              customRender: 'alipayAmt'
            }
          },
          {
            title: '预估服务费',
            align: 'center',
            dataIndex: 'preServiceFee',
            scopedSlots: {
              customRender: 'preServiceFee'
            }
          },
          {
            title: '结算金额',
            align: 'center',
            dataIndex: 'settleAmt',
            scopedSlots: {
              customRender: 'settleAmt'
            }
          },
          {
            title: '结算笔数',
            align: 'center',
            dataIndex: 'settleNum',
            scopedSlots: {
              customRender: 'settleNum'
            }
          },
          {
            title: '结算服务费',
            align: 'center',
            dataIndex: 'cmServiceFee',
            scopedSlots: {
              customRender: 'cmServiceFee'
            }
          }
        ],
        activity2: [
          // {
          //   id: 1338, // 自增id
          //   title: '哈哈哈',
          //   itemId: '562671013027', // 商品id
          //   pictUrl: '//img.alicdn.com/bao/uploaded/i4/899560653/TB2NUVfqFGWBuNjy0FbXXb4sXXa_!!899560653.jpg', // 商品图
          //   zkFinalPrice: '198.00', // 原价
          //   couponZkFinalPrice: '198.00', // 卷后价
          //   biz30day: 0, // 30//天销量
          //   shopTitle: '卓梵 阿玛尼璐璐专柜', // 店铺名称
          //   startTime: '2019-07-25', // 开始时间
          //   endTime: '2019-08-21', // 开始时间
          //   commissionRate: '30.1', // 佣金比例
          //   serviceRate: '2', // 服务费
          //   couponInfo: null, // 优惠卷信息
          //   eventId: '339512289', // 活动id
          //   new: '0', // 商品最新佣金
          //   is_alipayFee: '0.00', // 付款金额
          //   is_serviceFee: '0.00', // 预估服务费
          //   order_count: 1 // 订单数
          // }
        ],
        loading2: false,
        goodsList: [
          // {
          //   auctionUrl: '//item.taobao.com/item.htm?id=604194047150',
          //   auditStatus: 2, //审核状态  1待审核 2 已审核 3 已拒绝
          //   auditorNick: '千里江陵37xl',
          //   biz30day: 14,
          //   commissionRate: 20,
          //   couponChannelName: '阿里妈妈推广',
          //   couponEffectiveEndTime: '2020-11-11',
          //   couponEffectiveStartTime: '2020-11-04',
          //   couponInfo: '满109.00减20.00',
          //   couponLeftCount: 10000,
          //   couponTotalCount: 10000,
          //   couponZkFinalPrice: 89,
          //   endTime: '11-11',
          //   eventJoinRecordId: 378685631,
          //   itemId: 604194047150,
          //   itemStatus: null,
          //   jddNum: null,
          //   jddPrice: null,
          //   jhsStock: null,
          //   pictUrl: '//img.alicdn.com/bao/uploaded/i2/2200788127457/O1CN0192fuBF24xM5thsnTL_!!0-item_pic.jpg',
          //   sellerId: 2200788127457,
          //   serviceRate: 5,
          //   shopTitle: 'coolgear旗舰店',
          //   startTime: '11-04',
          //   title: '美国coolgear弹盖保温杯学生ins简约小巧可爱便携水杯大容量杯子',
          //   tljInfo: null,
          //   userType: 0,
          //   wangwang: '500销量',
          //   zkFinalPrice: 109
          // },

        ],
        activityradio: 1,
        loading: false,
        pagination: {
          pageSize: 40,
          total: 40,
          page: 1
        },
        pagination2: {
          pageSize: 15,
          total: 40,
          page: 1
        },
        search: '',
        passsearch: '',
        user_name: '',
        auditStatus: 'a',
        statuss: 1,
        severstr:
          moment()
            .month(moment().month())
            .startOf('month')
            .format('YYYY/MM/DD') +
          ' 至 ' +
          moment().format('YYYY/MM/DD'),
        pass:
          moment()
            .month(moment().month())
            .startOf('month')
            .format('YYYY/MM/DD') +
          ' 至 ' +
          moment().format('YYYY/MM/DD'),
        searchloading: false
      }
    },

    computed: {
      rows: function () {
        return this.$store.getters.rows
      }
    },
    destroyed () {
      this.$store.dispatch('setRowsname', '')
    },
    created () {
      //     const starttime = moment()
      //   .month(moment().month())
      //   .startOf('month')
      //   .unix()
      // const endtime = moment()
      //   .month(moment().month())
      //   .endOf('month')
      //   .unix()
      // console.log('rows', this.rows)
      this.getmyactivedata(this.rows.eventId)
      this.getexaminegoods(1, 40)
      // console.log(this.rows.eventId)
    },
    mounted () {
    },
    methods: {
      hideModal () {
        if (this.statuss === 1) {
          this.getextensioneffectdata(1, 40, this.passsearch)
        } else if (this.statuss === 2) {
          this.docopy(this.item)
        } else if (this.statuss === 3) {
          this.getmyactivedata(this.rows.eventId)
        }
        this.iframeshow = false
      },
      getmyactivedata (eventId) {
        getmyactivedata({
          eventId: eventId
        }).then(res => {
          // console.log(res)
          if (res.data.url) {
            this.taobaopurl = res.data.url
            this.iframeshow = true
            this.statuss = 3
            return
          }
          this.service = res.data
        }).catch(err => {
          console.log(err)
        })
      },
      severChange (dates, dateStrings) {
        // console.log('From: ', dates[0], ', to: ', dates[1])
        // console.log('From: ', dateStrings[0], ', to: ', dateStrings[1])
        // this.getactivitydata(dates[0].unix(), dates[1].unix())
        const str = dateStrings[0] + '至' + dateStrings[1]
        // str = str.substring(5, 7)
        this.severstr = str
      },
      handleTableChange2 (pagination, filters) {
        // console.log(pagination)
        var pager2 = {
          ...this.pagination2
        }
        pager2.current = pagination.current
        this.pagination2 = pager2
        this.fetch2({
          results: pagination.pageSize,
          page: pagination.current,
          ...filters
        })
      },
      fetch2 (params = {}) {
        // console.log('params:', params)
        this.getextensioneffectdata(params.page, 40, this.passsearch)
      },
      // 推广效果
      getextensioneffectdata (page, pagesize, search) {
        this.loading2 = true
        getextensioneffectdata({
          page: page,
          pagesize: pagesize,
          eventId: this.rows.eventId,
          search: search
        })
          .then(res => {
            // console.log(res)
            if (res.data.url) {
              this.taobaopurl = res.data.url
              this.iframeshow = true
              this.statuss = 1
              return
            }
            this.activity2 = res.data.result
            for (var i in this.activity2) {
              // console.log(moment(this.activity2[i].startTime).format('x'))
              const cha = moment(this.activity2[i].endTime).format('x') - moment(this.activity2[i].startTime).format('x')
              this.activity2[i].xiangcha = cha / (24 * 3600 * 1000)
              // console.log(this.activity2[i].startTime)
              // console.log(cha / (24 * 3600 * 1000))
            }
            this.pagination2.total = res.data.totalCount
            this.pagination2.current = res.data.pageNo
            this.loading2 = false
            this.loading = false
          })
          .catch(err => {
            console.log(err)
          })
      },
      dopasssearch () {
        console.log(this.passsearch)
        if (this.passsearch !== '') {
          this.searchloading = true
          this.getextensioneffectdata(1, 40, this.passsearch)
        }
      },
      userChange (e) {
        console.log(e.target.value)
        this.auditStatus = e.target.value
        this.getexaminegoods(1, 40, this.auditStatus, this.search)
      },
      groupChange (e) {
        console.log('radio checked', e.target.value)
        if (e.target.value === 1) {
          this.getexaminegoods(1, 40)
        } else {
          this.getextensioneffectdata(1, 40)
        }
      },
      // 查询佣金
      getcommission (id) {
        getcommission({
          goods_id: id
        })
          .then(res => {
            if (res.code === 200) {
              // console.log('返回', res)
              this.$success({
                title: '提示',
                content: '该商品佣金为' + res.data.commission_rate + '%'
              })
            } else {
              this.$message.info(res.msg)
            }
          })
          .catch(err => {
            console.log(err)
          })
      },

      getexaminegoods (page, pagesize, auditStatus, keyworld) {
        this.loading = true
        getexaminegoods({
          page: page,
          pagesize: pagesize,
          eventId: this.rows.eventId,
          auditStatus: auditStatus,
          keyworld: keyworld
        })
          .then(res => {
            // console.log(res)
            if (res.code === 200) {
              if (res.data.goods) {
                this.goodsList = res.data.goods
                var pagination = {
                  ...this.pagination
                }
                if (res.data.hasNext === true) {
                  pagination.total += 40
                } else {
                  pagination.total += 0
                }
                this.pagination = pagination
                this.pagination.current = res.data.pageNo
                this.loading = false
                this.loading2 = false
              }
            } else {
              this.$message.error(res.msg)
            }
          })
          .catch(err => {
            console.log(err)
          })
      },
      docopy (item) {
        // console.log(item)
        this.item = item
        const that = this
        getlinkurl({
          item_id: item.itemId,
          eventId: this.rows.eventId
        }).then(res => {
          // console.log(res)
          if (res.data.url) {
            this.taobaopurl = res.data.url
            this.iframeshow = true
            this.statuss = 2
            return
          }
          const str = res.data.link
          // const str = 'http://ad.alimama.com/zhaoshang/cpevent/index.htm?srcCode=1&keyword=' + this.rows.eventId
          this.$copyText(str).then(
            function (e) {
              // console.log(e)
              that.$success({
                title: '链接复制成功',
                content: str
              })
            },
            function (e) {
              console.log(e)
            }
          )
        }).catch(err => {
          console.log(err)
        })
      },
      // 审核商品
      doexaminegoods (itemid, status) {
        doexaminegoods({
          activity_id: this.rows.eventId,
          item_id: itemid,
          status: status // 审核状态 2=通过 3拒绝
        })
          .then(res => {
            if (res.code === 200) {
              this.$message.success('审核成功!')
            } else {
              this.$message.info(res.msg)
            }
          })
          .catch(err => {
            console.log(err)
          })
      },

      dopass (item) {
        // console.log(item)
        const that = this
        this.$confirm({
          title: '提示',
          content: '是否确认通过商品？',
          onOk () {
            that.doexaminegoods(item.itemId, 2)
          },
          onCancel () {
          }
        })
      },
      dorefuse (item) {
        const that = this
        this.$confirm({
          title: '提示',
          content: '是否确认拒绝商品？',
          onOk () {
            that.doexaminegoods(item.itemId, 3)
          },
          onCancel () {
          }
        })
      },
      handleTableChange (pagination, filters) {
        // console.log(pagination)
        const pager = {
          ...this.pagination
        }
        pager.current = pagination.current
        this.pagination = pager
        this.fetch({
          results: pagination.pageSize,
          page: pagination.current,
          ...filters
        })
      },
      fetch (params = {}) {
        // console.log('params:', params)
        this.getexaminegoods(params.page, 40, this.auditStatus, this.search)
      },
      onSearch (value) {
        // console.log(value)
        if (value !== '') {
          this.getexaminegoods(1, 40, this.auditStatus, value)
        }
      }
    }
  }
</script>

<style lang="less" scoped>
  .myaudit {
    position: relative;

    .card_title {
      color: rgba(16, 16, 16, 100);
      font-size: 14px;
      margin-bottom: 15px;
      font-weight: 600;
    }

    .header_box {
      // height: 101px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;

      .header-info {
        /*width: 100px;*/
        height: 70px;
        margin-right: 10px;

        .title {
          color: rgba(16, 16, 16, 0.7);
          font-size: 12px;
        }

        .datainfo {
          font-size: 28px;
          color: #101010;
          font-weight: 600;
        }
      }
    }

    .groupbox {
      margin-bottom: 18px;

      /deep/ .ant-radio-wrapper {
        color: #96989b;
        font-weight: 600;
      }

      /deep/ .ant-radio {
        display: none;
      }

      /deep/ .ant-radio-wrapper-checked {
        font-weight: 600;
        color: #101010;
      }
    }

    .goodsinfo {
      display: flex;

      .info-right {
        width: 300px;
        height: 100%;
        text-align: left;
      }
    }

    .nogoods {
      width: 300px;
      height: 200px;
      margin: 150px auto;
      text-align: center;
    }

    .lt_card {
      position: sticky;
      top: 0;
    }

    .choose {
      /deep/ .ant-select-selection {
        border-radius: 4px;
      }

      /deep/ .ant-input {
        border-radius: 4px;
      }
    }
  }
</style>
